<extend name="Layout/ins_page" />
<block name="content">
	{:W('PageHeader/simple',array('name'=>'编辑系统参数'))}
	<div class="oprator-panel">
		<a onclick="go_return_url();" class="btn">返回</a>
		<div class="split"></div>
		<a id="btn_save"  class="btn">保存</a>
		<span class="l">|</span>
		<a id="btn_del"  class="btn btn-del">删除</a>
	</div>
	<form method='post' id="form_data" action="{:U('update')}" >
		<table class="table table-bordered">
			<input type="hidden" name="opmode" id="opmode" value="edit">
			<input type="hidden"  id="id" name="id" value="{$vo.id}">
			<div class="layui-form-item">
				<label class="layui-form-label" for="code">代码*：</label>
				<div class="layui-input-block">
					<input class="layui-input" value="{$vo.code}" type="text" id="code" name="code" check="required" info="请输入代码">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label" for="name">名称*：</label>
				<div class="layui-input-block">
					<input class="layui-input" value="{$vo.name}" type="text" id="name" name="name" check="required" info="请输入名称">
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label" for="val">数据*：</label>
				<div class="layui-input-block">
					<input class="layui-input" value="{$vo.val}" type="text" id="val" name="val" check="required" info="请输入数据">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label" for="sort">排序：</label>
				<div class="layui-input-block">
					<input class="layui-input" value="{$vo.sort}" type="text" id="sort" name="sort" >
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label" for="is_del">状态*：</label>
				<div class="layui-input-block">
					<select   name="is_del" id="is_del" class="layui-input">
						<option value="0">启用</option>
						<option value="1">禁用</option>
					</select>
				</div>
			</div>
	</form>
</block>
<block name="js">
	<script type="text/javascript">
		function save() {
			send_form("form_data", '{:U("save")}');
		}

		function del() {
			var vars = $("#form_data").serialize();
			ui_confirm('确定要删除吗?', function() {
				send_form("form_data", "{:U('del')}");
			});
		}

		$(function() {
			set_val('is_del', "{$vo.is_del}");
		});
	</script>
</block>